/*LICENSE_BEGIN
 * ******************************************************************
 * Copyright 2006 by the Dainamite Robocup-Team at the
 * DAI-Labor, TU-Berlin (www.dai-labor.de)
 * 
 * Members of Dainamite are:
 * Holger Endert
 * Robert Wetzker
 * Thomas Karbe
 * Axel Heßler
 * Philippe Bütter
 * Felix Brossmann
 * 
 * Licensed under the GNU GPL (General Public License) Free Software 
 * License, Version 2. You may use this file only in compliance with 
 * the License. You may obtain a copy of the License at:
 * 
 * http://www.fsf.org/licensing/licenses/gpl.txt
 * ******************************************************************
LICENSE_END*/
/* Generated By:JavaCC: Do not edit this line. RobocupClientParserTokenManager.java */
                                   // Robocup Message Parser
package robocup.parser9;
// Subsequent Parsers
import robocup.component.infotypes.Info;
import robocup.component.RobocupAgent;
import java.io.StringReader;

public class RobocupClientParserTokenManager implements RobocupClientParserConstants
{
  public  java.io.PrintStream debugStream = System.out;
  public  void setDebugStream(java.io.PrintStream ds) { debugStream = ds; }
private final int jjStopAtPos(int pos, int kind)
{
   jjmatchedKind = kind;
   jjmatchedPos = pos;
   return pos + 1;
}
private final int jjMoveStringLiteralDfa0_0()
{
   switch(curChar)
   {
      case 32:
         return jjStopAtPos(0, 18);
      case 40:
         return jjStopAtPos(0, 16);
      case 41:
         return jjStopAtPos(0, 17);
      case 99:
         return jjMoveStringLiteralDfa1_0(0x400L);
      case 101:
         return jjMoveStringLiteralDfa1_0(0x4000L);
      case 104:
         return jjMoveStringLiteralDfa1_0(0x40L);
      case 105:
         return jjMoveStringLiteralDfa1_0(0x1000L);
      case 111:
         return jjMoveStringLiteralDfa1_0(0x2000L);
      case 112:
         return jjMoveStringLiteralDfa1_0(0x300L);
      case 114:
         return jjMoveStringLiteralDfa1_0(0x8000L);
      case 115:
         return jjMoveStringLiteralDfa1_0(0x8b0L);
      default :
         return 1;
   }
}
private final int jjMoveStringLiteralDfa1_0(long active0)
{
   try { curChar = input_stream.readChar(); }
   catch(java.io.IOException e) {
      return 1;
   }
   switch(curChar)
   {
      case 99:
         return jjMoveStringLiteralDfa2_0(active0, 0x800L);
      case 101:
         return jjMoveStringLiteralDfa2_0(active0, 0x80f0L);
      case 104:
         return jjMoveStringLiteralDfa2_0(active0, 0x400L);
      case 107:
         if ((active0 & 0x2000L) != 0L)
            return jjStopAtPos(1, 13);
         break;
      case 108:
         return jjMoveStringLiteralDfa2_0(active0, 0x300L);
      case 110:
         return jjMoveStringLiteralDfa2_0(active0, 0x1000L);
      case 114:
         return jjMoveStringLiteralDfa2_0(active0, 0x4000L);
      default :
         return 2;
   }
   return 2;
}
private final int jjMoveStringLiteralDfa2_0(long old0, long active0)
{
   if (((active0 &= old0)) == 0L)
      return 2;
   try { curChar = input_stream.readChar(); }
   catch(java.io.IOException e) {
      return 2;
   }
   switch(curChar)
   {
      case 97:
         return jjMoveStringLiteralDfa3_0(active0, 0x740L);
      case 99:
         return jjMoveStringLiteralDfa3_0(active0, 0x8000L);
      case 101:
         if ((active0 & 0x20L) != 0L)
            return jjStopAtPos(2, 5);
         break;
      case 105:
         return jjMoveStringLiteralDfa3_0(active0, 0x1000L);
      case 110:
         return jjMoveStringLiteralDfa3_0(active0, 0x10L);
      case 111:
         return jjMoveStringLiteralDfa3_0(active0, 0x800L);
      case 114:
         return jjMoveStringLiteralDfa3_0(active0, 0x4080L);
      default :
         return 3;
   }
   return 3;
}
private final int jjMoveStringLiteralDfa3_0(long old0, long active0)
{
   if (((active0 &= old0)) == 0L)
      return 3;
   try { curChar = input_stream.readChar(); }
   catch(java.io.IOException e) {
      return 3;
   }
   switch(curChar)
   {
      case 110:
         return jjMoveStringLiteralDfa4_0(active0, 0x400L);
      case 111:
         return jjMoveStringLiteralDfa4_0(active0, 0xc000L);
      case 114:
         if ((active0 & 0x40L) != 0L)
            return jjStopAtPos(3, 6);
         return jjMoveStringLiteralDfa4_0(active0, 0x800L);
      case 115:
         return jjMoveStringLiteralDfa4_0(active0, 0x10L);
      case 116:
         if ((active0 & 0x1000L) != 0L)
            return jjStopAtPos(3, 12);
         break;
      case 118:
         return jjMoveStringLiteralDfa4_0(active0, 0x80L);
      case 121:
         return jjMoveStringLiteralDfa4_0(active0, 0x300L);
      default :
         return 4;
   }
   return 4;
}
private final int jjMoveStringLiteralDfa4_0(long old0, long active0)
{
   if (((active0 &= old0)) == 0L)
      return 4;
   try { curChar = input_stream.readChar(); }
   catch(java.io.IOException e) {
      return 4;
   }
   switch(curChar)
   {
      case 101:
         if ((active0 & 0x800L) != 0L)
            return jjStopAtPos(4, 11);
         return jjMoveStringLiteralDfa5_0(active0, 0x390L);
      case 103:
         return jjMoveStringLiteralDfa5_0(active0, 0x400L);
      case 110:
         return jjMoveStringLiteralDfa5_0(active0, 0x8000L);
      case 114:
         if ((active0 & 0x4000L) != 0L)
            return jjStopAtPos(4, 14);
         break;
      default :
         return 5;
   }
   return 5;
}
private final int jjMoveStringLiteralDfa5_0(long old0, long active0)
{
   if (((active0 &= old0)) == 0L)
      return 5;
   try { curChar = input_stream.readChar(); }
   catch(java.io.IOException e) {
      return 5;
   }
   switch(curChar)
   {
      case 95:
         return jjMoveStringLiteralDfa6_0(active0, 0x10L);
      case 101:
         return jjMoveStringLiteralDfa6_0(active0, 0x400L);
      case 110:
         return jjMoveStringLiteralDfa6_0(active0, 0x8000L);
      case 114:
         return jjMoveStringLiteralDfa6_0(active0, 0x380L);
      default :
         return 6;
   }
}
private final int jjMoveStringLiteralDfa6_0(long old0, long active0)
{
   if (((active0 &= old0)) == 0L)
      return 6;
   try { curChar = input_stream.readChar(); }
   catch(java.io.IOException e) {
      return 6;
   }
   switch(curChar)
   {
      case 95:
         return jjMoveStringLiteralDfa7_0(active0, 0x780L);
      case 98:
         return jjMoveStringLiteralDfa7_0(active0, 0x10L);
      case 101:
         return jjMoveStringLiteralDfa7_0(active0, 0x8000L);
      default :
         return 7;
   }
}
private final int jjMoveStringLiteralDfa7_0(long old0, long active0)
{
   if (((active0 &= old0)) == 0L)
      return 7;
   try { curChar = input_stream.readChar(); }
   catch(java.io.IOException e) {
      return 7;
   }
   switch(curChar)
   {
      case 99:
         return jjMoveStringLiteralDfa8_0(active0, 0x8000L);
      case 111:
         return jjMoveStringLiteralDfa8_0(active0, 0x10L);
      case 112:
         return jjMoveStringLiteralDfa8_0(active0, 0x580L);
      case 116:
         return jjMoveStringLiteralDfa8_0(active0, 0x200L);
      default :
         return 8;
   }
}
private final int jjMoveStringLiteralDfa8_0(long old0, long active0)
{
   if (((active0 &= old0)) == 0L)
      return 8;
   try { curChar = input_stream.readChar(); }
   catch(java.io.IOException e) {
      return 8;
   }
   switch(curChar)
   {
      case 97:
         return jjMoveStringLiteralDfa9_0(active0, 0x180L);
      case 100:
         return jjMoveStringLiteralDfa9_0(active0, 0x10L);
      case 108:
         return jjMoveStringLiteralDfa9_0(active0, 0x400L);
      case 116:
         if ((active0 & 0x8000L) != 0L)
            return jjStopAtPos(8, 15);
         break;
      case 121:
         return jjMoveStringLiteralDfa9_0(active0, 0x200L);
      default :
         return 9;
   }
   return 9;
}
private final int jjMoveStringLiteralDfa9_0(long old0, long active0)
{
   if (((active0 &= old0)) == 0L)
      return 9;
   try { curChar = input_stream.readChar(); }
   catch(java.io.IOException e) {
      return 9;
   }
   switch(curChar)
   {
      case 97:
         return jjMoveStringLiteralDfa10_0(active0, 0x400L);
      case 112:
         return jjMoveStringLiteralDfa10_0(active0, 0x200L);
      case 114:
         return jjMoveStringLiteralDfa10_0(active0, 0x180L);
      case 121:
         if ((active0 & 0x10L) != 0L)
            return jjStopAtPos(9, 4);
         break;
      default :
         return 10;
   }
   return 10;
}
private final int jjMoveStringLiteralDfa10_0(long old0, long active0)
{
   if (((active0 &= old0)) == 0L)
      return 10;
   try { curChar = input_stream.readChar(); }
   catch(java.io.IOException e) {
      return 10;
   }
   switch(curChar)
   {
      case 97:
         return jjMoveStringLiteralDfa11_0(active0, 0x180L);
      case 101:
         if ((active0 & 0x200L) != 0L)
            return jjStopAtPos(10, 9);
         break;
      case 121:
         return jjMoveStringLiteralDfa11_0(active0, 0x400L);
      default :
         return 11;
   }
   return 11;
}
private final int jjMoveStringLiteralDfa11_0(long old0, long active0)
{
   if (((active0 &= old0)) == 0L)
      return 11;
   try { curChar = input_stream.readChar(); }
   catch(java.io.IOException e) {
      return 11;
   }
   switch(curChar)
   {
      case 101:
         return jjMoveStringLiteralDfa12_0(active0, 0x400L);
      case 109:
         if ((active0 & 0x80L) != 0L)
            return jjStopAtPos(11, 7);
         else if ((active0 & 0x100L) != 0L)
            return jjStopAtPos(11, 8);
         break;
      default :
         return 12;
   }
   return 12;
}
private final int jjMoveStringLiteralDfa12_0(long old0, long active0)
{
   if (((active0 &= old0)) == 0L)
      return 12;
   try { curChar = input_stream.readChar(); }
   catch(java.io.IOException e) {
      return 12;
   }
   switch(curChar)
   {
      case 114:
         return jjMoveStringLiteralDfa13_0(active0, 0x400L);
      default :
         return 13;
   }
}
private final int jjMoveStringLiteralDfa13_0(long old0, long active0)
{
   if (((active0 &= old0)) == 0L)
      return 13;
   try { curChar = input_stream.readChar(); }
   catch(java.io.IOException e) {
      return 13;
   }
   switch(curChar)
   {
      case 95:
         return jjMoveStringLiteralDfa14_0(active0, 0x400L);
      default :
         return 14;
   }
}
private final int jjMoveStringLiteralDfa14_0(long old0, long active0)
{
   if (((active0 &= old0)) == 0L)
      return 14;
   try { curChar = input_stream.readChar(); }
   catch(java.io.IOException e) {
      return 14;
   }
   switch(curChar)
   {
      case 116:
         return jjMoveStringLiteralDfa15_0(active0, 0x400L);
      default :
         return 15;
   }
}
private final int jjMoveStringLiteralDfa15_0(long old0, long active0)
{
   if (((active0 &= old0)) == 0L)
      return 15;
   try { curChar = input_stream.readChar(); }
   catch(java.io.IOException e) {
      return 15;
   }
   switch(curChar)
   {
      case 121:
         return jjMoveStringLiteralDfa16_0(active0, 0x400L);
      default :
         return 16;
   }
}
private final int jjMoveStringLiteralDfa16_0(long old0, long active0)
{
   if (((active0 &= old0)) == 0L)
      return 16;
   try { curChar = input_stream.readChar(); }
   catch(java.io.IOException e) {
      return 16;
   }
   switch(curChar)
   {
      case 112:
         return jjMoveStringLiteralDfa17_0(active0, 0x400L);
      default :
         return 17;
   }
}
private final int jjMoveStringLiteralDfa17_0(long old0, long active0)
{
   if (((active0 &= old0)) == 0L)
      return 17;
   try { curChar = input_stream.readChar(); }
   catch(java.io.IOException e) {
      return 17;
   }
   switch(curChar)
   {
      case 101:
         if ((active0 & 0x400L) != 0L)
            return jjStopAtPos(17, 10);
         break;
      default :
         return 18;
   }
   return 18;
}
static final int[] jjnextStates = {
};
public static final String[] jjstrLiteralImages = {
"", null, null, null, "\163\145\156\163\145\137\142\157\144\171", 
"\163\145\145", "\150\145\141\162", "\163\145\162\166\145\162\137\160\141\162\141\155", 
"\160\154\141\171\145\162\137\160\141\162\141\155", "\160\154\141\171\145\162\137\164\171\160\145", 
"\143\150\141\156\147\145\137\160\154\141\171\145\162\137\164\171\160\145", "\163\143\157\162\145", "\151\156\151\164", "\157\153", 
"\145\162\162\157\162", "\162\145\143\157\156\156\145\143\164", "\50", "\51", "\40", null, };
public static final String[] lexStateNames = {
   "DEFAULT", 
};
static final long[] jjtoToken = {
   0xffff1L, 
};
static final long[] jjtoSkip = {
   0xeL, 
};
protected SimpleCharStream input_stream;
private final int[] jjrounds = new int[0];
private final int[] jjstateSet = new int[0];
protected char curChar;
public RobocupClientParserTokenManager(SimpleCharStream stream)
{
   if (SimpleCharStream.staticFlag)
      throw new Error("ERROR: Cannot use a static CharStream class with a non-static lexical analyzer.");
   input_stream = stream;
}
public RobocupClientParserTokenManager(SimpleCharStream stream, int lexState)
{
   this(stream);
   SwitchTo(lexState);
}
public void ReInit(SimpleCharStream stream)
{
   jjmatchedPos = jjnewStateCnt = 0;
   curLexState = defaultLexState;
   input_stream = stream;
   ReInitRounds();
}
private final void ReInitRounds()
{
   int i;
   jjround = 0x80000001;
   for (i = 0; i-- > 0;)
      jjrounds[i] = 0x80000000;
}
public void ReInit(SimpleCharStream stream, int lexState)
{
   ReInit(stream);
   SwitchTo(lexState);
}
public void SwitchTo(int lexState)
{
   if (lexState >= 1 || lexState < 0)
      throw new TokenMgrError("Error: Ignoring invalid lexical state : " + lexState + ". State unchanged.", TokenMgrError.INVALID_LEXICAL_STATE);
   else
      curLexState = lexState;
}

protected Token jjFillToken()
{
   Token t = Token.newToken(jjmatchedKind);
   t.kind = jjmatchedKind;
   String im = jjstrLiteralImages[jjmatchedKind];
   t.image = (im == null) ? input_stream.GetImage() : im;
   t.beginLine = input_stream.getBeginLine();
   t.beginColumn = input_stream.getBeginColumn();
   t.endLine = input_stream.getEndLine();
   t.endColumn = input_stream.getEndColumn();
   return t;
}

int curLexState = 0;
int defaultLexState = 0;
int jjnewStateCnt;
int jjround;
int jjmatchedPos;
int jjmatchedKind;

public Token getNextToken() 
{
  int kind;
  Token specialToken = null;
  Token matchedToken;
  int curPos = 0;

  EOFLoop :
  for (;;)
  {   
   try   
   {     
      curChar = input_stream.BeginToken();
   }     
   catch(java.io.IOException e)
   {        
      jjmatchedKind = 0;
      matchedToken = jjFillToken();
      return matchedToken;
   }

   try { input_stream.backup(0);
      while (curChar <= 13 && (0x2600L & (1L << curChar)) != 0L)
         curChar = input_stream.BeginToken();
   }
   catch (java.io.IOException e1) { continue EOFLoop; }
   jjmatchedKind = 0x7fffffff;
   jjmatchedPos = 0;
   curPos = jjMoveStringLiteralDfa0_0();
   if (jjmatchedPos == 0 && jjmatchedKind > 19)
   {
      jjmatchedKind = 19;
   }
   if (jjmatchedKind != 0x7fffffff)
   {
      if (jjmatchedPos + 1 < curPos)
         input_stream.backup(curPos - jjmatchedPos - 1);
      if ((jjtoToken[jjmatchedKind >> 6] & (1L << (jjmatchedKind & 077))) != 0L)
      {
         matchedToken = jjFillToken();
         return matchedToken;
      }
      else
      {
         continue EOFLoop;
      }
   }
   int error_line = input_stream.getEndLine();
   int error_column = input_stream.getEndColumn();
   String error_after = null;
   boolean EOFSeen = false;
   try { input_stream.readChar(); input_stream.backup(1); }
   catch (java.io.IOException e1) {
      EOFSeen = true;
      error_after = curPos <= 1 ? "" : input_stream.GetImage();
      if (curChar == '\n' || curChar == '\r') {
         error_line++;
         error_column = 0;
      }
      else
         error_column++;
   }
   if (!EOFSeen) {
      input_stream.backup(1);
      error_after = curPos <= 1 ? "" : input_stream.GetImage();
   }
   throw new TokenMgrError(EOFSeen, curLexState, error_line, error_column, error_after, curChar, TokenMgrError.LEXICAL_ERROR);
  }
}

}
